package com.guangzi.mapper;

import com.guangzi.common.Pager;
import com.guangzi.entity.Role;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface RoleDao extends BaseDao {

    List<String> listRoles(String username);
    List<Role> list();


    void addRole(Role role);
    void updateRole(Role role);
    @Override
    List<Object> listPager(@Param("pager") Pager pager);
    @Override
    Long count();
    void updateStatus(@Param("roleId") Long roleId,@Param("status") Integer status);

    //通过账号查询用户的角色集合
    List<Role> listByAccount(String phone);


}
